package tech.yunland.shop.domain.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.moyuer.bsf.domain.model.AbstractEntity;
import com.moyuer.bsf.domain.model.Attachment;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 商品插图
 *
 * @author 袁首京<yuanshoujing@gmail.com>
 */
@Entity
@Table(name = "goods_pictures")
public class GoodsPictures extends AbstractEntity {

    @JSONField(serialize = false)
    @ManyToOne
    private Goods goods;

    @ManyToOne
    private Attachment picture;

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public Attachment getPicture() {
        return picture;
    }

    public void setPicture(Attachment picture) {
        this.picture = picture;
    }
}
